sql query optimization interview questions